#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int divide(int num);
int main()
{
	int num = 0;
	scanf("%d", &num);

	divide(num);
	return 0;
}

int divide(int num)
{
	if (num == 0)
		return 0;
	else
	{
		printf("%d ", num % 10);
		num /= 10;
		divide(num);
	}

}

